﻿/* Common Helper Styles */
.vertical-center-cell {
    display: table-cell;
    vertical-align: middle;
}

.border-box-sizing {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.preserve-space {
    white-space: pre-wrap;
}

.link {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    display: block;
    bottom: 0px;
}

.fill-container {
    width: 100%;
    height: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Common Tile Style */
.tile-base {
    float: left;
    height: 160px; /* If changing this the line-height in .center-text-tile must be changed also taking into account the padding and height set in this class */
    padding: 5px;
}

.tile-wrapper {
    height: 100%;
    padding: 10px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.inner-tile {
    height: 100%;
    width: 100%;
    display: table;
}

.center-text-tile {
    text-align: center;
    line-height: 150px; /* For vertical centering this should be the same as the tile height minus 10px (2 x padding) set in .tile-base */
}

.tile-base, .inner-tile, .tile-wrapper {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.navigation-link-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.tile-image-cell {
    width: 96px; /* Alter this value to support images of a different size on the tiles */
    text-align: center;
}

.tile-image-cell > img {
    max-width: 96px;
    max-height: 96px;
}

/* Common Text Styles */
.title-row {
    padding: 5px 32px 5px 0px; /* for presereving visibility of the document image when text wraps along side it */
}

.details-row, .title-row {
    margin-bottom: 5px;
}

.details-heading {
    padding: 5px 0px;
}

.details-heading, .details-text {
    word-wrap: break-word;
}

/* Login Module */
#login-outer {
    display: table;
}

#login-container {
    height: 300px;
    display: table;
}

#sign-in-text {
    margin: 0px 20px;
    line-height: 76px;
}

#login-logo {
    float: right;
    margin: 10px 10px 0px 10px;
    vertical-align: middle;
}

#login-details {
    margin: auto;
    padding: 2px 10px 10px 10px;
    clear: both;
}

#login-error {
    padding: 5px;
}

    #login-error img {
        margin-right: 5px;
    }

.login-parameter-text {
    padding: 5px 0px;
}

.login-parameter-input {
    width: 100%;
    border: 0px none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 5px 0px;
    padding: 3px;
}

#login-button {
    margin: 10px auto;
    width: 100px;
    display: block;
    padding: 10px;
    border: 0;
    cursor: default;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    text-decoration: none;
    text-align: center;
}

.login-information {
    line-height: 150%;
    margin-top: 5px;
}

/* Projects Module */
#projects-container {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0px;
    overflow: hidden; /* add height to div as it contains floated elements */
}

.project-alias {
    padding: 0px 5px 10px 5px;
}

.project-description {
    padding: 0px 5px 5px 5px;
}

/* History Module */
#history-container {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0px;
    overflow: hidden; /* add height to div as it contains floated elements */
}

/* Specification Details Module */
#spec-details-container {
    padding: 5px;
    overflow: hidden; /* Gives height to the parent container if it contains floated child elements */
}

#spec-details-panel {
    height: 210px;
    padding: 5px;
    overflow: hidden; /* Gives height to parent container as it contains floated elements */
}

#back-button-container {
    float: left;
    width: 100px;
    position: relative;
    margin-right: 10px;
}

#back-image-container {
    position: absolute;
    width: 100%;
    top: 50%;
    margin-top: -16px; /* Half of the height of the image for vertical alignment */
}

#back-button-image {
    margin: 0px auto;
    display: block;
    height: 32px; /* Must know the height of the image for vertical alignment to work */
}

#spec-details {
    overflow: hidden;
    position: relative;
}

#back-button-container, #spec-details {
    height: 100%;
}

#spec-details-inner {
    width: 100%;
    height: 100%;
    padding: 10px;
    display: table;
}

.document-image-placeholder {
    margin-right: 32px; /* Width of the document image to allow for wrapping around the background image */
}

.action-text {
    text-align: center;
}

.filter-container {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.filter-background {
    padding: 5px 10px;
}

.filter-title {
    float: left;
    padding-top: 2px;
    padding-right: 8px;
}

.filter-box {
    border: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 5px 0px;
    padding: 3px;
    width: 100%;
}

/* Older web enabled phones and small form factor devices */
@media only screen and (max-width: 240px) {
    /* Login */
    #login-container, #login-details {
        width: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    /* Projects */
    #history-tile {
        padding-top: 5px;
    }

    /* History */
    #projects-tile {
        padding-top: 5px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
    }

    #back-button-container {
        width: 50px;
    }

    .document-tile, .action-tile {
        width: 100%;
    }

    /* Common */
    .tile {
        width: 100%;
    }

    .tile-base {
        padding-top: 0px;
    }

    .loadingOverlayDetails {
        max-width: 180px;
    }
}

/* iPhones in portrait orientation and older web enabled phones in landscape */
@media only screen and (min-width: 241px) and (max-width: 399px) {
    /* Login */
    #login-container, #login-details {
        width: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    /* Projects */
    #history-tile {
        padding-top: 5px;
    }

    /* History */
    #projects-tile {
        padding-top: 5px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
    }

    #back-button-container {
        width: 50px;
    }

    .document-tile, .action-tile {
        width: 100%;
    }

    /* Common */
    .tile {
        width: 100%;
    }

    .tile-base {
        padding-top: 0px;
    }

    .loadingOverlayDetails {
        max-width: 220px;
    }
}

/* iPhones in landscape and other smartphones in portrait */
@media only screen and (min-width: 400px) and (max-width: 540px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /* Projects */
    #history-tile {
        padding-top: 5px;
    }

    /* History */
    #projects-tile {
        padding-top: 5px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
    }

    .document-tile, .action-tile {
        width: 100%;
    }

    /* Common */
    .tile {
        width: 100%;
    }

    .tile-base {
        padding-top: 0px;
    }

    .loadingOverlayDetails {
        max-width: 380px;
    }
}

/* Kindle Fire in portrait */
@media only screen and (min-width: 541px) and (max-width: 767px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /* Projects */
    #projects-container {
        margin: 20px;
    }

    /* History */
    #history-container {
        margin: 20px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
    }

    .document-tile {
        width: 50%;
    }

    .action-tile {
        width: 25%;
    }

    /* Commom */
    .tile {
        width: 50%;
    }

    .loadingOverlayDetails {
        max-width: 500px;
    }
}

/* iPads and tablets in portrait and smartphones in landscape */
@media only screen and (min-width: 768px) and (max-width: 959px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /* Projects */
    #projects-container {
        margin: 20px;
    }

    /* History */
    #history-container {
        margin: 20px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 90%;
        margin: 0px auto;
    }

    .document-tile {
        width: 50%;
    }

    .action-tile {
        width: 25%;
    }

    /* Common */
    .tile {
        width: 50%;
    }
}

/* The widest layout for tablets and desktops */
@media only screen and (min-width: 960px) and (max-width: 1600px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /* Projects */
    #projects-container {
        margin: 20px;
    }

    /* History */
    #history-container {
        margin: 20px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 90%;
        margin: 0px auto;
    }

    .document-tile {
        width: 33.3333%;
    }

    .action-tile {
        width: 16.66665%;
    }

    /* Common */
    .tile {
        width: 33.3333%;
    }
}

/* Large desktops */
@media only screen and (min-width: 1601px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /* Projects */
    #projects-container {
        margin: 20px;
    }

    /* History */
    #history-container {
        margin: 20px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 90%;
        margin: 0px auto;
    }

    .document-tile {
        width: 25%;
    }

    .action-tile {
        width: 12.5%;
    }

    /* Common */
    .tile {
        width: 25%;
    }
}
